package com.nf.test;


import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class 测试类 {
    public static void main(String[] args){
        //先拿到一个spring容器
        ApplicationContext context=new ClassPathXmlApplicationContext("applicationContext");
        电脑 computer= (电脑) context.getBean("computer");
        打印机 printer= (打印机) context.getBean("printer");



        System.out.println(computer);
        System.out.println(printer);

    }
}
